<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/static/element-ui/index.css">
    <style>
        body {
            min-height: 100vh;
            margin: 0;
            background: #f6f8fa;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Arial', sans-serif;
        }
        .login-container {
            background: #fff;
            border-radius: 14px;
            box-shadow: 0 2px 16px rgba(0,0,0,0.06);
            width: 300px;
            padding: 36px 24px 24px 24px;
            display: flex;
            flex-direction: column;
            align-items: center;
            transition: box-shadow 0.2s;
        }
        .login-title {
            font-size: 22px;
            color: #222;
            font-weight: 600;
            margin-bottom: 28px;
            letter-spacing: 1px;
        }
        .input-group {
            width: 90%;
            margin-bottom: 18px;
            display: flex;
            flex-direction: column;
        }
        .input-label {
            font-size: 14px;
            color: #666;
            margin-bottom: 6px;
            margin-left: 2px;
            letter-spacing: 1px;
        }
        .el-input {
            width: 100%;
            height: 40px;
            border-radius: 8px;
            border: 1px solid #e0e3e7;
            font-size: 15px;
            padding: 0 12px;
            background: #f8fafc;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .el-input:focus {
            border-color: #409EFF;
            box-shadow: 0 0 0 2px #409eff22;
            background: #fff;
        }
        .login-btn {
            width: 100%;
            height: 40px;
            margin-top: 8px;
            font-size: 16px;
            border-radius: 8px;
            background: #409EFF;
            border: none;
            color: #fff;
            font-weight: 600;
            letter-spacing: 1px;
            cursor: pointer;
            transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
        }
        .login-btn:hover {
            background: #337ecc;
            box-shadow: 0 4px 12px rgba(64,158,255,0.10);
            transform: translateY(-1px) scale(1.01);
        }
        .error-tip {
            color: #f56c6c;
            text-align: center;
            margin-bottom: 8px;
            min-height: 18px;
            font-size: 14px;
        }
        .success-tip {
            color: #67c23a;
            text-align: center;
            margin-bottom: 8px;
            min-height: 18px;
            font-size: 14px;
        }
        @media (max-width: 400px) {
            .login-container {
                width: 98vw;
                padding: 18px 2vw 18px 2vw;
            }
            .input-group {
                width: 100%;
            }
        }
        .register-link {
            width: 100%;
            text-align: right;
            margin-top: 8px;
        }
        .register-link a {
            color: #409EFF;
            font-size: 14px;
            text-decoration: none;
            transition: color 0.2s;
        }
        .register-link a:hover {
            color: #337ecc;
            text-decoration: underline;
        }
    </style>
</head>
<body>
<div class="login-container">
    <div class="login-title">高校教材管理系统</div>
    <form method="post" action="/user/login" style="width:100%">
        <div class="input-group">
            <label for="username" class="input-label">用户名</label>
            <input type="text" id="username" name="username" required class="el-input" placeholder="用户名">
        </div>
        <div class="input-group">
            <label for="password" class="input-label">密码</label>
            <input type="password" id="password" name="password" required class="el-input" placeholder="密码">
        </div>
        <div class="error-tip">
            <span th:if="${error}" th:text="${error}"></span>
        </div>
        <div class="success-tip" th:if="${registerSuccess}" th:text="${registerSuccess}"></div>
        <button type="submit" class="login-btn">登 录</button>
        <div class="register-link">
            <a href="/user/register">注册账号</a>
        </div>
    </form>
</div>
<script src="/static/element-ui/vue.js"></script>
<script src="/static/element-ui/index.js"></script>
</body>
</html> 